<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<title>Exported from Notepad++</title>
<style type="text/css">
span {
	font-family: 'Courier New';
	font-size: 10pt;
	color: #000000;
}
.sc0 {
}
.sc2 {
	font-style: italic;
	color: #0000FF;
}
.sc4 {
	color: #8000FF;
}
.sc5 {
	font-weight: bold;
	font-style: italic;
	color: #0000FF;
}
.sc8 {
	font-weight: bold;
	font-style: italic;
	color: #008000;
}
.sc10 {
	font-weight: bold;
	color: #0080FF;
}
.sc11 {
}
.sc14 {
	color: #8080FF;
}
</style>
</head>
<body>
<div style="float: left; white-space: pre; line-height: 1; background: #FFFFFF; "><span class="sc2">// ========================================================= //</span><span class="sc0">
</span><span class="sc2">// =============== BEBOP 1.0 : CODE SAMPLES ================ //</span><span class="sc0">
</span><span class="sc2">// ========================================================= //</span><span class="sc0">

</span><span class="sc2">// lightecho.bop </span><span class="sc0">

</span><span class="sc2">// Inclure la bopboard</span><span class="sc0">
</span><span class="sc10">#</span><span class="sc5">include</span><span class="sc0"> </span><span class="sc10">&lt;</span><span class="sc11">bopboard</span><span class="sc10">.</span><span class="sc11">bop</span><span class="sc10">&gt;</span><span class="sc0">

</span><span class="sc2">// Le nombre de ligth et boutons push</span><span class="sc0">
</span><span class="sc10">#</span><span class="sc5">define</span><span class="sc0"> </span><span class="sc8">N</span><span class="sc0"> </span><span class="sc4">8</span><span class="sc0">

</span><span class="sc2">// En accedant au boutons et LED 1 par 1</span><span class="sc0">
</span><span class="sc8">LightEchoStepByStep</span><span class="sc0"> </span><span class="sc10">()</span><span class="sc0"> </span><span class="sc10">=</span><span class="sc0"> </span><span class="sc10">()</span><span class="sc0">
</span><span class="sc5">where</span><span class="sc0">
    </span><span class="sc5">for</span><span class="sc0"> </span><span class="sc11">i</span><span class="sc0"> </span><span class="sc10">=</span><span class="sc0"> </span><span class="sc4">0</span><span class="sc0"> </span><span class="sc5">to</span><span class="sc0"> </span><span class="sc8">N</span><span class="sc10">-</span><span class="sc4">1</span><span class="sc0">
        </span><span class="sc10">$</span><span class="sc11">bopboard</span><span class="sc10">.</span><span class="sc11">light</span><span class="sc10">(</span><span class="sc14">"$(i)"</span><span class="sc10">,</span><span class="sc0"> </span><span class="sc10">$</span><span class="sc11">bopboard</span><span class="sc10">.</span><span class="sc11">push</span><span class="sc10">[</span><span class="sc4">1</span><span class="sc10">](</span><span class="sc14">"$(i)"</span><span class="sc10">)</span><span class="sc0"> </span><span class="sc10">);</span><span class="sc0">
    </span><span class="sc5">end</span><span class="sc0"> </span><span class="sc5">for</span><span class="sc10">;</span><span class="sc0">
</span><span class="sc5">end</span><span class="sc0"> </span><span class="sc5">where</span><span class="sc10">;</span><span class="sc0">

</span><span class="sc2">// En accedant au bus d'un seul coup</span><span class="sc0">
</span><span class="sc8">LightEchoBus</span><span class="sc0"> </span><span class="sc10">()</span><span class="sc0"> </span><span class="sc10">=</span><span class="sc0"> </span><span class="sc10">()</span><span class="sc0">
</span><span class="sc5">where</span><span class="sc0">
    </span><span class="sc11">push</span><span class="sc10">:[</span><span class="sc8">N</span><span class="sc10">]</span><span class="sc0"> </span><span class="sc10">=</span><span class="sc0"> </span><span class="sc10">$</span><span class="sc11">bopboard</span><span class="sc10">.</span><span class="sc11">push</span><span class="sc10">();</span><span class="sc0">
    </span><span class="sc10">$</span><span class="sc11">bopboard</span><span class="sc10">.</span><span class="sc11">light</span><span class="sc10">(</span><span class="sc11">push</span><span class="sc10">:[</span><span class="sc8">N</span><span class="sc10">]);</span><span class="sc0">  
</span><span class="sc5">end</span><span class="sc0"> </span><span class="sc5">where</span><span class="sc10">;</span><span class="sc0">


</span></div></body>
</html>
